#pragma once
#include <vector>
#include "Nod.h"
#include "Nod.h"
#include "Path.h"

class NodSuper
{
public:
	NodSuper(void);
	~NodSuper(void);
	//==Initialize
	//does what adoptOrphan and bornCommonchild do
	void Initialize(const std::vector<Nod*const>&);
	//--doCriticalPath
	//doCriticalPath
	//set Critical path 
	//takes critical Path
	int setCriticalPath(const std::vector<Nod*const>&);


private:
	//==AdoptOrphans
	//Searches for nods with no Parents and sets their parent as \param Start
	void AdoptOrphans   (const std::vector<Nod* const>&);
	//==BornCommonChild
	//Searches for nods with no children and sets their parent as \param end
	void BornCommonChild(const std::vector<Nod* const>&);
	Nod Start, End;
	std::vector<Path> vecOfPaths;
	Path makePath(const std::vector<Nod* const>&);
	Path findCriticalPath() const;
	Path CriticalPath;
};